﻿using System;
using System.Windows.Forms;
using HR60_PanelSoft.View.Base;
using HR60_PanelSoft.View.TabForms;

namespace HR60_PanelSoft.View.Controls
{
	public class FormTextBox : BaseFormControl
	{
		private TextBox textBox = new TextBox();
		
		public FormTextBox()
		{
			textBox.Margin = new Padding(0);
			textBox.Dock = DockStyle.Fill;
			textBox.TextChanged += new EventHandler(valueChange);

			this.AutoSize = false;
			this.Width = 100;
			this.Height = 21;
			this.Controls.Add(textBox);
		}

		// 重写Value属性
		public override object Value
		{
			get
			{
				return textBox.Text;
			}
			set
			{
				textBox.Text = value == null ? null : value.ToString();
			}
		}

	}
}
